<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mytable/jrtable/yg_dms_order.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mytable/jrtable/yg_dms_order.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'xiangm',
                footer: "Foots",
                cnName: 'DMS订单',
                name: 'jrtable/yg_dms_order',
                url: "/yg_dms_order/",
                sortName: "xiangm"
            });
            const editFormFields = ref({"xiangm":"","shuom":"","heth":"","yanfdh":"","cust_name":"","yangbwl":"","jiesrq":"","shul":"","jiaohq":"","zhuangt":"","beizhu":"","mobbh":"","biaop":""});
            const editFormOptions = ref([[{"title":"产品名称","field":"shuom","disabled":true},
                               {"title":"技术规范号","required":true,"field":"xiangm","disabled":true}],
                              [{"title":"订单号","field":"heth","disabled":true},
                               {"title":"订单头物料号","field":"yanfdh","disabled":true}],
                              [{"title":"客户名称","field":"cust_name","disabled":true},
                               {"title":"产品物料号","field":"yangbwl","disabled":true}],
                              [{"title":"接受时间","field":"jiesrq","disabled":true},
                               {"title":"数量","required":true,"field":"shul","disabled":true,"type":"decimal"}],
                              [{"title":"交货日期","field":"jiaohq","disabled":true},
                               {"title":"状态","field":"zhuangt","disabled":true}],
                              [{"title":"备注","field":"beizhu","disabled":true,"colSize":12}],
                              [{"title":"技术模版号","field":"mobbh","disabled":true},
                               {"title":"公告号","field":"biaop","disabled":true}]]);
            const searchFormFields = ref({"shuom":"","heth":"","yanfdh":"","cust_name":"","yangbwl":"","jiesrq":"","zhuangt":"","mobbh":""});
            const searchFormOptions = ref([[{"title":"产品名称","field":"shuom","type":"like"},{"title":"订单号","field":"heth","type":"like"}],[{"title":"订单头物料号","field":"yanfdh","type":"like"},{"title":"客户名称","field":"cust_name","type":"like"}],[{"title":"产品物料号","field":"yangbwl","type":"like"},{"title":"接受时间","field":"jiesrq","type":"datetime"}],[{"title":"状态","field":"zhuangt","type":"text"},{"title":"技术模版号","field":"mobbh","type":"like"}]]);
            const columns = ref([{field:'xiangm',title:'技术规范号',type:'string',link:true,width:110,readonly:true,require:true,align:'left',sort:true},
                       {field:'shuom',title:'产品名称',type:'string',width:120,readonly:true,align:'left'},
                       {field:'heth',title:'订单号',type:'string',width:150,readonly:true,align:'left'},
                       {field:'yanfdh',title:'订单头物料号',type:'string',width:150,readonly:true,align:'left'},
                       {field:'cust_name',title:'客户名称',type:'string',width:230,readonly:true,align:'left'},
                       {field:'yangbwl',title:'产品物料号',type:'string',width:110,readonly:true,align:'left'},
                       {field:'jiesrq',title:'接受时间',type:'datetime',width:110,readonly:true,align:'left',sort:true},
                       {field:'shul',title:'数量',type:'decimal',width:110,readonly:true,require:true,align:'left'},
                       {field:'jiaohq',title:'交货日期',type:'datetime',width:110,readonly:true,align:'left',sort:true},
                       {field:'zhuangt',title:'状态',type:'string',width:110,readonly:true,align:'left'},
                       {field:'beizhu',title:'备注',type:'string',width:220,readonly:true,align:'left'},
                       {field:'mobbh',title:'技术模版号',type:'string',width:110,readonly:true,align:'left'},
                       {field:'biaop',title:'公告号',type:'string',width:110,readonly:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
